<template>
  <div class="detail-container">
    <v-merchant-card :userInfo="userInfo"/>
    <div class="content fx-1">
      <v-salesmen-list />
    </div>
  </div>
</template>

<script lang="ts">
  import { Vue, Component } from 'vue-property-decorator'
  import vMerchantCard from '@/components/merchant-card'
  import vSalesmenList from '../list'

  @Component({
    components: {
      vMerchantCard,
      vSalesmenList
    }
  })
  export default class MerchantsDetail extends Vue {
    get activeRouter () {
       return this.tabs[0]
    }

    tabs = [
      '审核完成',
      '实名认证',
      '业务授权',
      '对公账号绑定',
    ]
    userInfo = {}

    async getUserDetail () {
      let id = this.$route.params.id
      let res: AjaxResponse = await this.$axios.get(`b/boms/user/view/${id}`)
      this.userInfo = res.data
    }

    mounted () {
      this.getUserDetail()
    }
  }
</script>

<style lang="less" scoped>
  .detail-container {
    display: flex;
    flex-direction: row;
  }

  .content {
    margin-left: 10px;
    display: flex;
    flex-direction: column;
  }

</style>
